package com.lawyer.repository;


import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.data.rest.core.annotation.RepositoryRestResource;

import com.lawyer.entity.view.OrderSuccessQuantityView;

@RepositoryRestResource(exported = false)
public interface OrderSuccessQuantityViewRepository extends PagingAndSortingRepository<OrderSuccessQuantityView, String> , JpaSpecificationExecutor<OrderSuccessQuantityView> {
	
	
	@Query(value = "select sum(orderSuccessQuantity) from order_success_quantity_view where top_id like %?1%", nativeQuery = true)
	Object orderSuccessQuantity(String leaderId);
}
